<template>
  <div class="user-trade">
    <!--    用户管理-交易用户-->
    <BasicTable @register="registerTable" />
  </div>
</template>

<script setup lang="ts">
  import mcApi from 'mc-c2b2m-operator-api';
  import { tableColumns, tableFormSchema } from './data';
  import { BasicTable, useTable } from '@/components/Table';
  import { useTableAction } from '@/hooks/web/useTableAction';

  const { SystemModule } = mcApi;
  const { UserApi } = SystemModule;
  const { handleFetchDateParams } = useTableAction();

  const [registerTable] = useTable({
    striped: false,
    bordered: false,
    canResize: false,
    useSearchForm: true,
    columns: tableColumns,
    showIndexColumn: false,
    api: UserApi.getUserTradePage,
    beforeFetch: (arg) => handleFetchDateParams(arg),
    formConfig: {
      labelWidth: 120,
      schemas: tableFormSchema,
    },
  });
</script>

<style scoped lang="scss">
  :deep(.ant-table-thead > tr > th) {
    background: #fff;
  }
</style>
